<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    class people{
        name;
        constructor(name){
            this.name = name;
        }
        run(){
            console.log(this.name +"run...");
        }
    }
    class pupil extends people{
        grade;
        name;
        constructor(grade,name){
            super(name);
            this.grade = grade;
            this.name = name;
        }
        proud(){
            alert("我是小学生！")
        }
    }
    var xm = new people("jj");
    var xh = new pupil(1,"xh");
</script>
</body>
</html>